import { Link } from "expo-router";
import { StyleSheet, Text, View } from "react-native";
import CusBtn from "../../components/CusBtn";

export default function Index() {
  return (
    <View style={styles.container}>
      <Text>这是首页</Text>
      <Link
        href={{
          pathname: "/users/[id]",
          params: { id: "userId" },
        }}
        asChild
      >
        <CusBtn text="跳转到用户页面"></CusBtn>
      </Link>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: "center",
    alignItems: "center",
  },
});
